<?php
class Application_Form_Cp_Auth extends Zend_Form
{
	public function init()
	{
		$this->getDecorator('HtmlTag');
		$this->setOptions(array('class' => 'form'));
		$this->setAction('/cp/auth/login')
			->setMethod('post')
			->setAttribs(array(
				'id' => 'cp-auth-form',
				'class' => 'form'
			));
		$this->addElement('text', 'auth_login', array(
				'label' => 'Логин:',
				'validators' => array(
						'alnum',
						array('stringLength', false, array(3, 20))
				),
				'required' => true,
				'filters' => array('StringToLower')
		));
		$this->addElement('password', 'auth_password', array(
				'label' => 'Пароль:',
				'validators' => array(
						array('stringLength', false, array(5, 40))
				),
				'required' => true,
		));
	}
}